FROM jenkins/jenkins:lts

LABEL maintainer="chenwenlong <chenwenlong@epweike.com>"

USER root

RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
    && echo 'Asia/Shanghai' > /etc/timezone

COPY sources.list /etc/apt/sources.list

RUN apt-get update \
  && apt-get install -y sudo libltdl7 \
  && rm -rf /var/lib/apt/lists/*

RUN echo "jenkins ALL=NOPASSWD: ALL" >> /etc/sudoers

USER jenkins

EXPOSE 8080 50000